package com.yun.platform.sys.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_user")
public class User implements Serializable {
    @Id
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String phone;
    private String userName;
    private String password;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value="create_Time",fill = FieldFill.UPDATE)
    private Date createTime;

    @TableField(exist = false)//非数据库字段
    private String token;

}
